package com.puhui.lib.utils

import com.puhui.lib.BuildConfig
import com.tencent.bugly.crashreport.CrashReport

@JvmOverloads
fun reportCaughtException(throwable: Throwable, throwIt: Boolean = false) {
    if (BuildConfig.DEBUG || throwIt) {
        throwable.printStackTrace()
        throw throwable
    } else {
        CrashReport.postCatchedException(throwable)
    }
}